﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Net.Http;
using Newtonsoft.Json;

namespace WebServiceTMS.Helpers
{
    public static class HttpResponseHelper
    {
        public static HttpResponseMessage CreateHttpResponse(string status, string message)
        {
            TMSServerResponse errorResponse = new TMSServerResponse();
            errorResponse.Status = status;
            errorResponse.Message = message;

            return new HttpResponseMessage { Content = new StringContent(JsonConvert.SerializeObject(errorResponse), System.Text.Encoding.UTF8, "application/json") };
        }
    }
}